package kit.edu.lego.gruppe3.levels.treeArea;

import kit.edu.lego.gruppe3.ComponentsRepository;
import kit.edu.lego.gruppe3.levels.LevelSelector;
import lejos.robotics.navigation.DifferentialPilot;
import lejos.robotics.subsumption.Behavior;

public class TreeAreaMovement implements Behavior{
	
	
	
	private DifferentialPilot robot = ComponentsRepository.getInstance().getRobotPilot();
	
	@Override
	public void action() {
		robot.setTravelSpeed(15);
//		robot.steer(3);
		robot.forward();
	}

	@Override
	public void suppress() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean takeControl() {
		return LevelSelector.getInstance().isTreeArea() && !TreeAreaSolver.objectFound;
	}

}
